﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Gmantis.Controls.Extended;

namespace Gmantis.Controls.Test
{
    public partial class TabControl : Form
    {
        public TabControl()
        {
            InitializeComponent();

            var storyboard = new Storyboard();
            var animation = new DoubleAnimation();
            animation.Duration = TimeSpan.FromSeconds(4);
            animation.From = 0;
            animation.To = 100;
            animation.RepeatBehavior = RepeatBehavior.Forever;
            animation.AutoReverse = true;
            animation.EasingFunction = new QuadraticEase() { EasingMode = EasingMode.EaseInOut };
            Storyboard.SetTarget(animation, progressBar);
            Storyboard.SetTargetProperty(animation, new PropertyPath("(ProgressBar.Value)"));
            storyboard.Children.Add(animation);
            storyboard.Begin();
            UserConfig["test"] = 12;
            object test = UserConfig["test"];
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            PromptBox.Show("请输入姓名", "录入姓名", delegate(string input, MessageBoxResult result)
            {

            });
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("测试消息", "Title", MessageBoxButton.OKCancel, MessageBoxIcon.Information, delegate(MessageBoxResult result)
            {

            });
        }

        private void editor_OpenButtonClick(object sender, RoutedEventArgs e)
        {
            this.editor.Text = "测试字符串";
        }

        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            boolEditor.Value = true;
        }

        private void boolEditor_ValueChanged(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("测试成功！");
        }
    }
}
